package lesson10;

public class Test01 {
    public static void main(String[] args) {
        // 获取当前系统时间的毫秒数
        long startTime = System.currentTimeMillis();
        String str = "";
//        for(int i = 0 ;i < 100000;i++){
//            str += i;
//        }
        long endTime = System.currentTimeMillis();
        System.out.println(endTime - startTime);

        // 获取系统相关属性
        System.out.println(System.getProperties());

        Runtime runtime = Runtime.getRuntime();
        System.out.println("当前虚拟机处理器数量：" + runtime.availableProcessors());
        System.out.println("获取可用内存：" + runtime.freeMemory());
        System.out.println("获取最大内存：" + runtime.maxMemory());
        System.out.println("获取内存总量：" + runtime.totalMemory());
    }
}
